OsmGt example¶

Imports and prepare input parameters¶

In [1]:
from IPython.display import display

from bokeh.plotting import output_notebook
from bokeh.plotting import show

import geopandas as gpd

from shapely.geometry import Point
from shapely.ops import linemerge

from gdf2bokeh import Gdf2Bokeh

from osmgt import OsmGt

from graph_tool.topology import shortest_path


output_notebook()


location = "Roanne"
Loading BokehJS ...

Get POIs¶

In [2]:
%%time

pois_gdf = OsmGt.pois_from_location(location).get_gdf()

display(pois_gdf.head(2))
2022-05-21 18:23:28 - OsmGtPoi        - INFO     : From location: Roanne
2022-05-21 18:23:28 - OsmGtPoi        - INFO     : Loading data...
2022-05-21 18:23:28 - OsmGtPoi        - INFO     : NominatimApi: Query 200:OK in 0.18 sec.
2022-05-21 18:23:30 - OsmGtPoi        - INFO     : OverpassApi: Query 200:OK in 2.34 sec.
2022-05-21 18:23:30 - OsmGtPoi        - INFO     : Formating data
2022-05-21 18:23:30 - OsmGtPoi        - INFO     : Prepare GeoDataframe
2022-05-21 18:23:30 - OsmGtPoi        - INFO     : GeoDataframe Ready
addr:postcode amenity atm change_machine name opening_hours operator operator:wikidata operator:wikipedia phone ... source:opening_hours clothes waste office second_hand recycling:cartons recycling:plastic_packaging indoor post_box:type geometry
0 42300 post_office yes yes Roanne Principal Mo,We-Fr 08:30-18:00; Tu 08:30-12:00,13:45-18:... La Poste Q373724 fr:La Poste (entreprise française) 3631 ... NaN NaN NaN NaN NaN NaN NaN NaN NaN POINT (4.07225 46.04071)
1 NaN place_of_worship NaN NaN Chapelle Jean Puy NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN POINT (4.07073 46.03766)

2 rows × 134 columns

CPU times: user 215 ms, sys: 15.9 ms, total: 231 ms
Wall time: 2.77 s

Get Roads¶

In [3]:
%%time
roads_initialized = OsmGt.roads_from_location(
    location,
    mode="vehicle",
    additional_nodes=pois_gdf
)
roads_gdf = roads_initialized.get_gdf()

display(roads_gdf.head(2))
2022-05-21 18:23:30 - OsmGtRoads      - INFO     : From location: Roanne
2022-05-21 18:23:30 - OsmGtRoads      - INFO     : Loading data...
2022-05-21 18:23:31 - OsmGtRoads      - INFO     : NominatimApi: Query 200:OK in 0.18 sec.
2022-05-21 18:23:35 - OsmGtRoads      - INFO     : OverpassApi: Query 200:OK in 3.48 sec.
2022-05-21 18:23:35 - OsmGtRoads      - INFO     : Rebuild network data
2022-05-21 18:23:35 - OsmGtRoads      - INFO     : Network cleaning...
2022-05-21 18:23:35 - OsmGtRoads      - INFO     : Starting: Adding new nodes on the network
2022-05-21 18:23:35 - OsmGtRoads      - INFO     : Find nearest line for each node
2022-05-21 18:23:35 - OsmGtRoads      - INFO     : Split line
2022-05-21 18:23:35 - OsmGtRoads      - INFO     : Topology lines checker: to add: 314, to split: 309
2022-05-21 18:23:35 - OsmGtRoads      - INFO     : Starting: Find intersections
2022-05-21 18:23:35 - OsmGtRoads      - INFO     : Done: Find intersections
2022-05-21 18:23:35 - OsmGtRoads      - INFO     : Build lines
2022-05-21 18:23:36 - OsmGtRoads      - INFO     : Prepare GeoDataframe
2022-05-21 18:23:36 - OsmGtRoads      - INFO     : GeoDataframe Ready
highway lanes maxspeed name oneway ref id osm_url topo_uuid topology ... smoothness turn:lanes cycleway:both:lane maxspeed:backward maxspeed:forward busway:right cycleway:left:oneway segregated maxheight geometry
0 primary 2 50 Rue de Charlieu yes D 482 24035569 https://www.openstreetmap.org/way/24035569 1_forward unchanged ... NaN NaN NaN NaN NaN NaN NaN NaN NaN LINESTRING (4.08544 46.05234, 4.08546 46.05248...
1 primary NaN 50 Rue de Charlieu yes D 482 24035570 https://www.openstreetmap.org/way/24035570 2_forward unchanged ... NaN NaN NaN NaN NaN NaN NaN NaN NaN LINESTRING (4.09088 46.06633, 4.09084 46.06622...

2 rows × 76 columns

CPU times: user 1.34 s, sys: 61.7 ms, total: 1.41 s
Wall time: 5.52 s

Display roads and nodes¶

In [4]:
%%time
layers_to_add = [
    {
        "input_gdf": roads_gdf,
        "legend": "roads",
        "color": "black",
    },
    {
        "input_gdf": pois_gdf,
        "legend": "POIs",
        "color": "blue",
        "size": 9
    },
]



my_map = Gdf2Bokeh(
    "My roads and POIs - from OsmGT (https://github.com/amauryval)",
    layers=layers_to_add
)
# print(dir(my_map))
# print(my_map._Gdf2Bokeh__BOKEH_LAYER_CONTAINERS)



show(my_map.figure)
CPU times: user 2.74 s, sys: 55.1 ms, total: 2.8 s
Wall time: 2.8 s

Check topology details¶

In [5]:
%%time

roads_topology_gdfs = roads_initialized.topology_checker()

lines_unchanged = roads_topology_gdfs["lines_unchanged"]
lines_added = roads_topology_gdfs["lines_added"]
lines_split = roads_topology_gdfs["lines_split"]
nodes_added = roads_topology_gdfs["nodes_added"]
intersections_added = roads_topology_gdfs["intersections_added"]

layers_to_add = [
    {
        "input_gdf": lines_unchanged,
        "legend": "roads unchanged",
        "color": "black",
    },
    {
        "input_gdf": lines_added,
        "legend": "roads added",
        "color": "green",
    },
    {
        "input_gdf": lines_split,
        "legend": "roads split",
        "color": "orange",
    },
    {
        "input_gdf": intersections_added,
        "legend": "Intersections added",
        "color": "brown",
    },
    {
        "input_gdf": nodes_added,
        "legend": "Nodes added",  # POIs here
        "style": "square",
        "color": "blue",
        "size": 9
    },
]

my_map = Gdf2Bokeh(
    "Topology about my roads and POIs - from OsmGT (https://github.com/amauryval)",
    layers=layers_to_add
)
show(my_map.figure)
2022-05-21 18:23:39 - OsmGtRoads      - INFO     : Prepare topology data
2022-05-21 18:23:39 - OsmGtRoads      - INFO     : GeoDataframe Ready
CPU times: user 4.3 s, sys: 43.7 ms, total: 4.34 s
Wall time: 4.34 s

Get the graph-tool network and display it¶

In [6]:
%%time
graph = roads_initialized.get_graph()

# a plot method has been added on OsmGT.
graph.plot()
2022-05-21 18:23:43 - OsmGtRoads      - INFO     : Prepare graph
2022-05-21 18:23:45 - OsmGtRoads      - INFO     : Graph to image
CPU times: user 20.4 s, sys: 22.9 ms, total: 20.4 s
Wall time: 11.9 s

Compute a shortest path¶

With graph-tools function¶

In [7]:
%%time
# now, we have to define a start point and a end point and get their wkt
start_node_topo_uuid = 47
end_node_topo_uuid = 63

# 'topo_uuid' is generated by osmgt (during the topology processing).
# Some roads has been split that's whyso this id has been created.
start_node_gdf = pois_gdf[pois_gdf['topo_uuid'] == start_node_topo_uuid]
end_node_gdf = pois_gdf[pois_gdf['topo_uuid'] == end_node_topo_uuid]

start_node_wkt = start_node_gdf.iloc[0]["geometry"].wkt
end_node_wkt = end_node_gdf.iloc[0]["geometry"].wkt

# the graph have some methods (graph-tools method always exists!) to find egdes, vertices... Let's use the .find_vertex_from_name(). the wkt is the vertex name...
source_vertex = graph.find_vertex_from_name(start_node_wkt)
target_vertex = graph.find_vertex_from_name(end_node_wkt)

# shortest path computing...
path_vertices, path_edges = shortest_path(
    graph,
    source=source_vertex,
    target=target_vertex,
    weights=graph.edge_weights  # weigth is based on line length
)

# get path by using edge names
roads_ids = [
    graph.edge_names[edge]
    for edge in path_edges
]

roads_gdf_copy = roads_gdf.copy(deep=True)
shortest_path_found = roads_gdf_copy[roads_gdf['topo_uuid'].isin(roads_ids)].to_crs(3857)['geometry'].to_list()
shortest_path_found_gdf = gpd.GeoDataFrame(index=[0], crs="EPSG:3857", geometry=[linemerge(shortest_path_found)])

layers_to_add = [
    {
        "input_gdf": shortest_path_found_gdf,
        "legend": "shortest_path",
        "color": "red",
        "line_width": 5
    },
    {
        "input_gdf": start_node_gdf,
        "legend": "source node",
        "color": "blue",
        "style": "circle",
        "size": 9
    },
    {
        "input_gdf": end_node_gdf,
        "legend": "target node",
        "color": "green",
        "style": "circle",
        "size": 9
    },
]

my_shortest_path_map = Gdf2Bokeh(
    "My shortest path - from OsmGT (https://github.com/amauryval)",
    layers=layers_to_add
)
show(my_shortest_path_map.figure)
CPU times: user 194 ms, sys: 4 ms, total: 198 ms
Wall time: 197 ms

With OsmGt function¶

In [8]:
%%time

start_node_topo_uuid = 47
end_node_topo_uuid = 63

start_node_gdf = pois_gdf[pois_gdf['topo_uuid'] == start_node_topo_uuid]
end_node_gdf = pois_gdf[pois_gdf['topo_uuid'] == end_node_topo_uuid]

start_node = start_node_gdf.iloc[0]["geometry"]
end_node = end_node_gdf.iloc[0]["geometry"]

shortest_paths = OsmGt.shortest_path_from_location(
    "Roanne",
    [
        (start_node, end_node),
        (start_node, end_node),  # duplicate pairs are cleaned
    ],
    mode="pedestrian"
)
layers_to_add = [
    {
        "input_gdf": shortest_paths[["geometry"]],
        "legend": "shortest_path",
        "color": "red",
        "line_width": 5
    },
    {
        "input_gdf": start_node_gdf,
        "legend": "source node",
        "color": "blue",
        "style": "circle",
        "size": 9
    },
    {
        "input_gdf": end_node_gdf,
        "legend": "target node",
        "color": "green",
        "style": "circle",
        "size": 9
    },
]

my_shortest_path_map = Gdf2Bokeh(
    "My shortest path - from OsmGT (https://github.com/amauryval)",
    layers=layers_to_add
)
show(my_shortest_path_map.figure)

display(shortest_paths)
2022-05-21 18:23:55 - OsmGtShortestPath - INFO     : Shortest path processing...
2022-05-21 18:23:55 - OsmGtShortestPath - INFO     : From location: Roanne
2022-05-21 18:23:55 - OsmGtShortestPath - INFO     : Loading data...
2022-05-21 18:23:56 - OsmGtShortestPath - INFO     : NominatimApi: Query 200:OK in 0.18 sec.
2022-05-21 18:23:58 - OsmGtShortestPath - INFO     : OverpassApi: Query 200:OK in 1.63 sec.
2022-05-21 18:23:58 - OsmGtShortestPath - INFO     : Rebuild network data
2022-05-21 18:23:58 - OsmGtShortestPath - INFO     : Network cleaning...
2022-05-21 18:23:58 - OsmGtShortestPath - INFO     : Starting: Adding new nodes on the network
2022-05-21 18:23:58 - OsmGtShortestPath - INFO     : Find nearest line for each node
2022-05-21 18:23:58 - OsmGtShortestPath - INFO     : Split line
2022-05-21 18:23:58 - OsmGtShortestPath - INFO     : Topology lines checker: to add: 2, to split: 2
2022-05-21 18:23:58 - OsmGtShortestPath - INFO     : Starting: Find intersections
2022-05-21 18:23:58 - OsmGtShortestPath - INFO     : Done: Find intersections
2022-05-21 18:23:58 - OsmGtShortestPath - INFO     : Build lines
2022-05-21 18:23:58 - OsmGtShortestPath - INFO     : Prepare graph
2022-05-21 18:23:59 - OsmGtShortestPath - INFO     : Prepare GeoDataframe
2022-05-21 18:23:59 - OsmGtShortestPath - INFO     : GeoDataframe Ready
2022-05-21 18:23:59 - OsmGtShortestPath - INFO     : Compute shortest path from 2902 to 2903
2022-05-21 18:23:59 - OsmGtShortestPath - INFO     : Prepare GeoDataframe
2022-05-21 18:23:59 - OsmGtShortestPath - INFO     : GeoDataframe Ready
2022-05-21 18:23:59 - OsmGtShortestPath - INFO     : Prepare GeoDataframe
2022-05-21 18:23:59 - OsmGtShortestPath - INFO     : GeoDataframe Ready
source_node target_node osm_ids osm_urls geometry id
0 POINT (4.053432 46.024165) POINT (4.0775424 46.046573) 120171169, 120171186, 122371009, 122371019, 12... https://www.openstreetmap.org/way/120171169, h... LINESTRING (4.05343 46.02417, 4.05338 46.02393... 0
CPU times: user 1.94 s, sys: 44.4 ms, total: 1.98 s
Wall time: 4.28 s

Compute an isochrone¶

Isochrone from times¶

In [9]:
%%time

topo_uuids_poi = [99, 167, 188]

source_nodes = pois_gdf[pois_gdf['topo_uuid'].isin(topo_uuids_poi)]

# 2 = 2 min ; 5 = 5 min ; 10 = 10 min
isochrones_polygon_values = {
    1: "#d9ef8b",
    5: "#fee08b",
    10: "#f46d43"
}

isochrones_lines_values = {
    1: "#668100",
    5: "#e2a803",
    10: "#962603"
}

trip_speed = 0.5  # km/h

location_points = list(source_nodes["geometry"])
# location_points.extend(location_points)

isochrones_polygons, isochrones_lines = OsmGt.isochrone_times_from_nodes(
    location_points,
    list(isochrones_polygon_values.keys()),
    trip_speed,
    mode="pedestrian"
)

isochrones_polygons["color"] = isochrones_polygons["iso_name"].map(lambda x: isochrones_polygon_values[x])
isochrones_lines["color"] = isochrones_lines["iso_name"].map(lambda x: isochrones_lines_values[x])


layers_to_add = [
    {
        "input_gdf": source_nodes,
        "legend": "Source nodes",
        "style": "circle",
        "color": "red",
        "size": 5
    },
    {
        "input_gdf": isochrones_polygons,
        "legend": "iso_name",
        "fill_color": "color",
        "line_color": "color",
        "fill_alpha": 0.5
    },
    {
        "input_gdf": isochrones_lines,
        "legend": "iso_name",
        "color": "color",
        "line_width": 2
    },
]

my_shortest_path_map = Gdf2Bokeh(
    "Isochrones from times - from OsmGT (https://github.com/amauryval)",
    layers=layers_to_add
)
show(my_shortest_path_map.figure)

print("\nIsochrones polygons output")
display(isochrones_polygons)

print("\nIsochrones lines output")
display(isochrones_lines.head(2))
2022-05-21 18:24:00 - OsmGtIsochrone  - INFO     : Isochrone processing...
2022-05-21 18:24:00 - OsmGtIsochrone  - INFO     : From bbox: (4.065331739709741, 46.03137925848238, 4.076676960290258, 46.03862976056118)
2022-05-21 18:24:00 - OsmGtIsochrone  - INFO     : Loading data...
2022-05-21 18:24:01 - OsmGtIsochrone  - INFO     : OverpassApi: Query 200:OK in 1.06 sec.
2022-05-21 18:24:01 - OsmGtIsochrone  - INFO     : Rebuild network data
2022-05-21 18:24:01 - OsmGtIsochrone  - INFO     : Network cleaning...
2022-05-21 18:24:01 - OsmGtIsochrone  - INFO     : Starting: Adding new nodes on the network
2022-05-21 18:24:01 - OsmGtIsochrone  - INFO     : Find nearest line for each node
2022-05-21 18:24:01 - OsmGtIsochrone  - INFO     : Split line
2022-05-21 18:24:01 - OsmGtIsochrone  - INFO     : Topology lines checker: to add: 3, to split: 3
2022-05-21 18:24:01 - OsmGtIsochrone  - INFO     : Starting: Find intersections
2022-05-21 18:24:01 - OsmGtIsochrone  - INFO     : Done: Find intersections
2022-05-21 18:24:01 - OsmGtIsochrone  - INFO     : Build lines
2022-05-21 18:24:01 - OsmGtIsochrone  - INFO     : Get water data from OSM
2022-05-21 18:24:04 - OsmGtIsochrone  - INFO     : OverpassApi: Query 200:OK in 2.94 sec.
2022-05-21 18:24:04 - OsmGtIsochrone  - INFO     : Prepare GeoDataframe
2022-05-21 18:24:04 - OsmGtIsochrone  - INFO     : GeoDataframe Ready
2022-05-21 18:24:04 - OsmGtIsochrone  - INFO     : Prepare graph
2022-05-21 18:24:06 - OsmGtIsochrone  - INFO     : Compute isochrone: 10 minutes => 84 meters
2022-05-21 18:24:06 - OsmGtIsochrone  - INFO     : Compute isochrone: 5 minutes => 42 meters
2022-05-21 18:24:06 - OsmGtIsochrone  - INFO     : Compute isochrone: 1 minutes => 9 meters
2022-05-21 18:24:08 - OsmGtIsochrone  - INFO     : GeoDataframe Ready
ERROR:bokeh.core.validation.check:E-1006 (NON_MATCHING_DATA_SOURCES_ON_LEGEND_ITEM_RENDERERS): LegendItem.label is a field, but renderer data sources don't match: LegendItem(id='1949', ...)
Isochrones polygons output
iso_name time_unit iso_distance distance_unit geometry id color
0 10 minutes 84 meters POLYGON ((4.07251 46.03174, 4.07251 46.03174, ... 0 #f46d43
1 10 minutes 84 meters POLYGON ((4.06675 46.03669, 4.06668 46.03671, ... 1 #f46d43
2 10 minutes 84 meters POLYGON ((4.06533 46.03693, 4.06534 46.03694, ... 2 #f46d43
3 10 minutes 84 meters POLYGON ((4.07630 46.03804, 4.07623 46.03805, ... 3 #f46d43
4 5 minutes 42 meters POLYGON ((4.07176 46.03204, 4.07177 46.03204, ... 4 #fee08b
5 5 minutes 42 meters POLYGON ((4.06638 46.03678, 4.06634 46.03680, ... 5 #fee08b
6 5 minutes 42 meters POLYGON ((4.07567 46.03810, 4.07572 46.03823, ... 6 #fee08b
7 1 minutes 9 meters POLYGON ((4.06633 46.03681, 4.06631 46.03684, ... 7 #d9ef8b
8 1 minutes 9 meters POLYGON ((4.07181 46.03199, 4.07180 46.03201, ... 8 #d9ef8b
9 1 minutes 9 meters POLYGON ((4.07571 46.03799, 4.07571 46.03798, ... 9 #d9ef8b
Isochrones lines output
highway junction name source:name id osm_url topo_uuid topology busway maxspeed ... busway:right cycleway:left:oneway covered footway incline maxheight iso_name iso_distance geometry color
105 footway NaN NaN NaN 586846030 https://www.openstreetmap.org/way/586846030 155_0105 split NaN NaN ... NaN NaN NaN NaN NaN NaN 10.0 84.0 LINESTRING (4.06586 46.03674, 4.06587 46.03672... #962603
106 footway NaN NaN NaN 586846030 https://www.openstreetmap.org/way/586846030 155_1106 split NaN NaN ... NaN NaN NaN NaN NaN NaN 10.0 84.0 LINESTRING (4.06590 46.03665, 4.06591 46.03660) #962603

2 rows × 48 columns

CPU times: user 4.34 s, sys: 317 ms, total: 4.66 s
Wall time: 8.4 s

Isochrone from distances¶

In [10]:
%%time

topo_uuids_poi = [99, 167, 188]

source_nodes = pois_gdf[pois_gdf['topo_uuid'].isin(topo_uuids_poi)]

# 2 = 2 min ; 5 = 5 min ; 10 = 10 min
isochrones_polygon_values = {
    20: "#d9ef8b",
    50: "#fee08b",
    100: "#f46d43"
}

isochrones_lines_values = {
    20: "#668100",
    50: "#e2a803",
    100: "#962603"
}

trip_speed = 3  # km/h

location_points = list(source_nodes["geometry"])
# location_points.extend(location_points)

isochrones_polygons, isochrones_lines = OsmGt.isochrone_distances_from_nodes(
    location_points,
    list(isochrones_polygon_values.keys()),
    trip_speed,
    mode="pedestrian"
)

isochrones_polygons["color"] = isochrones_polygons["iso_distance"].map(lambda x: isochrones_polygon_values[x])
isochrones_lines["color"] = isochrones_lines["iso_distance"].map(lambda x: isochrones_lines_values[x])


layers_to_add = [
    {
        "input_gdf": source_nodes,
        "legend": "Source nodes",
        "style": "circle",
        "color": "red",
        "size": 5
    },
    {
        "input_gdf": isochrones_polygons,
        "legend": "iso_name",
        "fill_color": "color",
        "line_color": "color",
        "fill_alpha": 0.5
    },
    {
        "input_gdf": isochrones_lines,
        "legend": "iso_name",
        "color": "color",
        "line_width": 2
    },
]

my_shortest_path_map = Gdf2Bokeh(
    "Isochrones from times - from OsmGT (https://github.com/amauryval)",
    layers=layers_to_add
)
show(my_shortest_path_map.figure)

print("\nIsochrones polygons output")
display(isochrones_polygons)

print("\nIsochrones lines output")
display(isochrones_lines.head(2))
2022-05-21 18:24:08 - OsmGtIsochrone  - INFO     : Isochrone processing...
2022-05-21 18:24:08 - OsmGtIsochrone  - INFO     : From bbox: (4.065144890130645, 46.031249535337075, 4.076863809869355, 46.03875946638327)
2022-05-21 18:24:08 - OsmGtIsochrone  - INFO     : Loading data...
2022-05-21 18:24:10 - OsmGtIsochrone  - INFO     : OverpassApi: Query 200:OK in 1.31 sec.
2022-05-21 18:24:10 - OsmGtIsochrone  - INFO     : Rebuild network data
2022-05-21 18:24:10 - OsmGtIsochrone  - INFO     : Network cleaning...
2022-05-21 18:24:10 - OsmGtIsochrone  - INFO     : Starting: Adding new nodes on the network
2022-05-21 18:24:10 - OsmGtIsochrone  - INFO     : Find nearest line for each node
2022-05-21 18:24:10 - OsmGtIsochrone  - INFO     : Split line
2022-05-21 18:24:10 - OsmGtIsochrone  - INFO     : Topology lines checker: to add: 3, to split: 3
2022-05-21 18:24:10 - OsmGtIsochrone  - INFO     : Starting: Find intersections
2022-05-21 18:24:10 - OsmGtIsochrone  - INFO     : Done: Find intersections
2022-05-21 18:24:10 - OsmGtIsochrone  - INFO     : Build lines
2022-05-21 18:24:10 - OsmGtIsochrone  - INFO     : Get water data from OSM
2022-05-21 18:24:11 - OsmGtIsochrone  - INFO     : OverpassApi: Query 200:OK in 1.58 sec.
2022-05-21 18:24:11 - OsmGtIsochrone  - INFO     : Prepare GeoDataframe
2022-05-21 18:24:12 - OsmGtIsochrone  - INFO     : GeoDataframe Ready
2022-05-21 18:24:12 - OsmGtIsochrone  - INFO     : Prepare graph
2022-05-21 18:24:14 - OsmGtIsochrone  - INFO     : Compute isochrone: 2.0 minutes => 100 meters
2022-05-21 18:24:14 - OsmGtIsochrone  - INFO     : Compute isochrone: 1.0 minutes => 50 meters
2022-05-21 18:24:14 - OsmGtIsochrone  - INFO     : Compute isochrone: 0.4 minutes => 20 meters
2022-05-21 18:24:15 - OsmGtIsochrone  - INFO     : GeoDataframe Ready
ERROR:bokeh.core.validation.check:E-1006 (NON_MATCHING_DATA_SOURCES_ON_LEGEND_ITEM_RENDERERS): LegendItem.label is a field, but renderer data sources don't match: LegendItem(id='2190', ...)
Isochrones polygons output
iso_name time_unit iso_distance distance_unit geometry id color
0 2.0 minutes 100 meters POLYGON ((4.07270 46.03169, 4.07271 46.03169, ... 0 #f46d43
1 2.0 minutes 100 meters POLYGON ((4.06690 46.03666, 4.06690 46.03666, ... 1 #f46d43
2 2.0 minutes 100 meters POLYGON ((4.07640 46.03800, 4.07576 46.03795, ... 2 #f46d43
3 1.0 minutes 50 meters POLYGON ((4.07162 46.03201, 4.07166 46.03204, ... 3 #fee08b
4 1.0 minutes 50 meters POLYGON ((4.06688 46.03666, 4.06689 46.03666, ... 4 #fee08b
5 1.0 minutes 50 meters POLYGON ((4.06645 46.03676, 4.06644 46.03677, ... 5 #fee08b
6 1.0 minutes 50 meters POLYGON ((4.06620 46.03692, 4.06622 46.03692, ... 6 #fee08b
7 1.0 minutes 50 meters POLYGON ((4.07573 46.03835, 4.07581 46.03832, ... 7 #fee08b
8 0.4 minutes 20 meters POLYGON ((4.06634 46.03680, 4.06624 46.03682, ... 8 #d9ef8b
9 0.4 minutes 20 meters POLYGON ((4.07180 46.03192, 4.07176 46.03197, ... 9 #d9ef8b
10 0.4 minutes 20 meters POLYGON ((4.07568 46.03806, 4.07568 46.03807, ... 10 #d9ef8b
Isochrones lines output
highway maxspeed name oneway id osm_url topo_uuid topology junction source:name ... busway:right cycleway:left:oneway covered footway incline maxheight iso_name iso_distance geometry color
5 tertiary 30 Rue Diderot yes 179152153 https://www.openstreetmap.org/way/179152153 1045 unchanged NaN NaN ... NaN NaN NaN NaN NaN NaN 2.0 100.0 LINESTRING (4.07514 46.03849, 4.07496 46.03847) #962603
7 residential 30 Rue Diderot yes 179152367 https://www.openstreetmap.org/way/179152367 105_07 split NaN NaN ... NaN NaN NaN NaN NaN NaN 1.0 50.0 LINESTRING (4.07601 46.03819, 4.07590 46.03823... #e2a803

2 rows × 49 columns

CPU times: user 4.29 s, sys: 27.9 ms, total: 4.32 s
Wall time: 7.2 s